package com.atguigu.gmall.web.controller;


import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 登录页
 */
@Controller
public class LoginController {


    /**
     * 跳转到登录页
     * @return
     */
    @GetMapping("/login.html")
    public String LoginPage(Model model,
                            @RequestParam(value = "originUrl",required = false) String url){

        model.addAttribute("originUrl",url);

        //跳转页面,逻辑视图
        //真实视图:   classpath:/templates/逻辑视图.html
        return "login";
    }
}
